<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="table-box">
        <caption>Stack<E>支持的方法</caption>
        <table border="1">
            <thead>
                <tr>
                    <th>方法</th>
                    <th>作用</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>boolean add(E e)</td>
                    <td>在队列尾部插入一个元素</td>
                </tr>
                <tr>
                    <td>boolean offer(E e)</td>
                    <td>在队列尾部插入一个元素</td>
                </tr>
                <tr>
                    <td>E element()</td>
                    <td>返回队列头部的对象，但不从栈中移除它</td>
                </tr>
                <tr>
                    <td>E peek()</td>
                    <td>返回队列头部的对象，但不从栈中移除它</td>
                </tr>
                <tr>
                    <td>E remove()</td>
                    <td>返回队列头部的对象，并从栈中移除它</td>
                </tr>
                <tr>
                    <td>E poll()</td>
                    <td>返回队列头部的对象，并从栈中移除它</td>
                </tr>
            </tbody>
        </table>
    </div>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="table-box">
        <caption>Queue<E>支持的方法</caption>
        <table border="1">
            <thead>
                <tr>
                    <th>方法</th>
                    <th>作用</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>boolean add(E e)</td>
                    <td>在队列尾部插入一个元素</td>
                </tr>
                <tr>
                    <td>boolean offer(E e)</td>
                    <td>在队列尾部插入一个元素</td>
                </tr>
                <tr>
                    <td>E element()</td>
                    <td>返回队列头部的对象，但不从栈中移除它</td>
                </tr>
                <tr>
                    <td>E peek()</td>
                    <td>返回队列头部的对象，但不从栈中移除它</td>
                </tr>
                <tr>
                    <td>E remove()</td>
                    <td>返回队列头部的对象，并从栈中移除它</td>
                </tr>
                <tr>
                    <td>E poll()</td>
                    <td>返回队列头部的对象，并从栈中移除它</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>

</html>